Ext.onReady(function() {
	$(document).ready(function() {
		window.Ext.Test = [];
		window.Ext.Test.CountRequestComplete = 0;
		window.Ext.Test.ServerError =[];
		window.Ext.Test.ClientError =[];
		window.Ext.Ajax.on('beforerequest',function(conn, response, options) {
		    window.Ext.Test.CountRequestComplete++;
		});
		window.Ext.Ajax.on('requestcomplete',function(conn, response, options) {
		    if (window.Ext.Test.CountRequestComplete > 0) {
		        window.Ext.Test.CountRequestComplete--;
		    }
		});
		window.Ext.Ajax.on('requestexception',function(conn, response, options){
			window.Ext.Test.ServerError.push({
			    StatusCode: response.status,
			    Message: response.responseText,
			    Url: options.url});
		});
		window.onerror = function(message, url, line){
		    window.Ext.Test.ClientError.push({
			    Message: message,
			    Url: url,
			    Line: line});
		};});
});